module.exports = (sequelize, DataTypes) => {
    const Singer = sequelize.define(
        "singer",
        {
            // 在这里定义模型属性
            singerId: {
                type: DataTypes.INTEGER, //模型字段类型
                primaryKey: true, //主键
                autoIncrement: true, //自增长
            },
            name: {
                type: DataTypes.STRING,
                allowNull: true,
            },
            photo: {
                type: DataTypes.STRING,
                allowNull: true,
            },
            sex: {
                type: DataTypes.STRING,
                allowNull: true,
            },
            birth: {
                type: DataTypes.STRING,
                allowNull: true,
            },
            introduce: {
                type: DataTypes.STRING,
                allowNull: true,
            },
            hobby: {
                type: DataTypes.STRING,
                allowNull: true,
            },
        },
        {
            tableName: "singer",
            timestamps: true,
        }
    );

    return Singer;
};
